# 时间戳转换工具  1726963200000 -> 2024-09-22 08:00:00
def timestamp_to_date(timestamp):
    import time
    timeArray = time.localtime(timestamp / 1000)
    otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
    return otherStyleTime
# 2024-09-01 00:00:00 -> 172696320000
def date_to_timestamp(date):
    import time
    timeArray = time.strptime(date, "%Y-%m-%d %H:%M:%S")
    timestamp = int(time.mktime(timeArray)) * 1000
    return timestamp